import { reqGetList } from "../../api/api";
import { useEffect, useState } from "react";
export const useGetList = () => {
  const [list, setList] = useState([]);
  useEffect(() => {
    getList();
  }, []);
  const getList = async () => {
    const res = await reqGetList();
    setList(res);
  };

  return {
    list,
    setList,
  };
};
